Fix import shadowing errors in tests
authorBrian Koropoff <bkoropoff@gmail.com>
Mon, 18 Aug 2014 01:34:50 +0000 (18:34 -0700)
committerBrian Koropoff <bkoropoff@gmail.com>
Mon, 18 Aug 2014 01:34:50 +0000 (18:34 -0700)
tests/test_cargo_bench.rs
tests/test_cargo_test.rs

index cae06099c41560d29f1808955fea43ecbf7b354a..85571ae50f0ad456e80846f4401360f85e0bbd51 100644 (file)
@@ -673,21 +673,21 @@ test!(bench_dylib {
             [dependencies.bar]
             path = "bar"
         "#)
-        .file("src/lib.rs", "
-            extern crate bar;
+        .file("src/lib.rs", r#"
+            extern crate the_bar = "bar";
             extern crate test;
 
-            pub fn bar() { bar::baz(); }
+            pub fn bar() { the_bar::baz(); }
 
             #[bench]
             fn foo(_b: &mut test::Bencher) {}
-        ")
+        "#)
         .file("benches/bench.rs", r#"
-            extern crate foo;
+            extern crate the_foo = "foo";
             extern crate test;
 
             #[bench]
-            fn foo(_b: &mut test::Bencher) { foo::bar(); }
+            fn foo(_b: &mut test::Bencher) { the_foo::bar(); }
         "#)
         .file("bar/Cargo.toml", r#"
             [package]
index fad13657be939cf57b0508f2c6cdb76055b3312a..d78e4342b3e61c9c813dba7598a30bbed7c1c0bd 100644 (file)
@@ -652,19 +652,19 @@ test!(test_dylib {
             [dependencies.bar]
             path = "bar"
         "#)
-        .file("src/lib.rs", "
-            extern crate bar;
+        .file("src/lib.rs", r#"
+            extern crate the_bar = "bar";
 
-            pub fn bar() { bar::baz(); }
+            pub fn bar() { the_bar::baz(); }
 
             #[test]
             fn foo() { bar(); }
-        ")
+        "#)
         .file("tests/test.rs", r#"
-            extern crate foo;
+            extern crate the_foo = "foo";
 
             #[test]
-            fn foo() { foo::bar(); }
+            fn foo() { the_foo::bar(); }
         "#)
         .file("bar/Cargo.toml", r#"
             [package]